<template>
  <div class="matching-res">
    <div class="title">政策图谱</div>
    <policyAtlas v-if="policyData" :data="policyData" />
  </div>
</template>

<script setup lang="ts">
import { onMounted, ref } from "vue";
import { useRoute } from "vue-router";
import policyAtlas from "../../../components/policyAtlas/index.vue";

import { matchingPolicy } from "../../../service/matching";

const route = useRoute();

const policyData = ref<any>(null);

// 根据当前路由参数请求政策图谱数据
const params: any = { ...route.query };
matchingPolicy(params).then((res: any) => {
  policyData.value = { id: "0", label: "政策图谱", children: [...res.data] };
});
</script>

<style scoped lang="postcss">
.matching-res {
  .title {
    @apply text-center my-4 font-bold;
    font-size: 28px;
  }
}
</style>
